/**
 * Version: 1.1
 * Author: TangJun
 * Date: 2024-07-16
 */
class A {
    int a;
    {
        System.out.println("A实例代码块");
    }
    static {
        System.out.println("A静态代码块");
    }
    A(int a){
        this.a = a;
        System.out.println("A构造方法");
    }

}

class B extends A {
    int b;
    B(int a, int b) {
        super(a);
        this.b = b;
        System.out.println("B构造方法");
    }
    {
        System.out.println("B实例代码块");
    }
    static {
        System.out.println("B静态代码块");
    }
    public void func() {
        System.out.println("haha");
    }
}
public class OrderTest {
    public static void main(String[] args) {
        B val = new B(1,2);
        val.func();
    }
}


